/**
 * @file ai_system_controller.h
 * @brief Main controller for AI communication system
 */

#ifndef AI_SYSTEM_CONTROLLER_H
#define AI_SYSTEM_CONTROLLER_H

#include "ai_message_router.h"
#include "stlstrings.h"

class AISystemController
{
public:
    enum SystemMode {
        MODE_INTERACTIVE = 0,
        MODE_BATCH,
        MODE_SERVICE,
        MODE_DEBUG
    };

    AISystemController();
    
    bool StartSystem(SystemMode mode = MODE_INTERACTIVE);
    void StopSystem();
    int ProcessCommandLine(int argc, char* argv[]);
    void RunInteractiveSession();
    int ExecuteScriptFile(const wxString& scriptPath);
    wxString GetStatusReport() const;

private:
    AIMessageRouter& m_router;
    SystemMode m_currentMode;
    bool m_isRunning;
    
    void RunInteractiveMode();
    void RunBatchMode(const std::vector<wxString>& commands);
    void RunServiceMode();
    void RunDebugMode();
    AIMessage ParseCommandLine(const wxString& commandLine);
};

#endif
